package com.scs.application.modules.dept.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 * 试剂三级库使用明细
 * </p>
 *
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "试剂三级库使用明细")
@TableName("dept_use_reagent")
@EntityIndexAnnotation(ix = {"matr_id","matr_spec","matr_model","sn","rfid", "use_start_time"})
public class UseReagent extends DataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "科室ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = ""
    )
    private String deptId;

    @EntityFieldAnnotation(
            text = "试剂组id",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = ""
    )
    private String reagentTeamId;

    @EntityFieldAnnotation(
            text = "设备编码",
            length = "20",
            not_null = false,
            default_value = ""
    )
    private String equipmentCode;

    @EntityFieldAnnotation(
            text = "消耗类型",
            length = "10",
            not_null = true,
            default_value = "",
            comment = "MANUAL：手工消耗；EQUIPMENT：上机消耗（试剂消耗）；EXPIRE：报损&过期消耗；DIST：配送消耗；"
    )
    private String useType;

    @EntityFieldAnnotation(
            text = "耗材ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = ""
    )
    private String matrId;

    @EntityFieldAnnotation(
            text = "品名",
            length = "255",
            not_null = true,
            default_value = ""
    )
    private String matrName;

    @EntityFieldAnnotation(
            text = "规格",
            length = "255",
            not_null = true,
            default_value = "",
            comment = "品规"
    )
    private String matrSpec;

    @EntityFieldAnnotation(
            text = "型号",
            length = "100",
            not_null = false,
            default_value = ""
    )
    private String matrModel;

    @EntityFieldAnnotation(
            text = "金额",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double amount;

    @EntityFieldAnnotation(
            text = "批次",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String lot;

    @EntityFieldAnnotation(
            text = "SN",
            length = "30",
            not_null = false,
            default_value = ""
    )
    private String sn;

    @EntityFieldAnnotation(
            text = "RFID",
            length = "30",
            not_null = false,
            default_value = ""
    )
    private String rfid;

    @EntityFieldAnnotation(
            text = "包装单位",
            length = "10",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String packageUnit;

    @EntityFieldAnnotation(
            text = "包装数量",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double packageQty;

    @EntityFieldAnnotation(
            text = "单品单位",
            length = "10",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String skuUnit;

    @EntityFieldAnnotation(
            text = "单品价格",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double skuPrice;

    @EntityFieldAnnotation(
            text = "数量",
            length = "",
            not_null = false,
            default_value = "",
            comment = "单品数量"
    )
    private Double skuQty;

    @EntityFieldAnnotation(
            text = "使用数量",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double useQty;

    @EntityFieldAnnotation(
            text = "人份",
            not_null = false,
            default_value = "0",
            comment = "人份"
    )
    private Double personPortion;

    @EntityFieldAnnotation(
            text = "取用人",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String user;

    @EntityFieldAnnotation(
            text = "开始使用时间",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Date useStartTime;

    @EntityFieldAnnotation(
            text = "结束使用时间",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Date useEndTime;

    @EntityFieldAnnotation(
            text = "消耗结束标识",
            length = "",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean isEnd;

    @EntityFieldAnnotation(
            text = "备注",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;

}
